Subject: origin/target notation

From: [email-masked] (Scott Barvick)
Date: Thu, 15 Jul 93 17:35:53 EDT

Bernie mentioned the origin/target notation ambiguity.  This is also
an issue with the basic SNA connection procedure.  The RFC describes
the connection establishment case where the station which generates
the TEST, also generates the SABME.  If this is true, the text 
describing the 'origin' and 'target' stations is understandable and
will not lead to the question of who are the origin and target, and 
what is the frame direction.  

What happens when a secondary LU intiates the TEST (origin), the
primary LU (target) responds, XIDs flow, then the primary LU generates
the SABME?  Is origin/target relationship reversed?  This would
seem to be the answer, and I'm sure that IBM has solved this already.  It
is just not very clear in the RFC.

Scott

---

From: [email-masked]
Date: Thu, 15 Jul 93 15:14:49 PDT

>is just not very clear in the RFC.

Here is the way I read the RFC 1434 state machine:

    For the case of origin station = primary link station:

        At the origin DLSw:

            In Circuit Established state:
                receive a DLC_CONTACTED from DLC (i.e. DLC received 
                        a SABME and sent a UA :-)
                send a CONTACT to target DLSw
                issue a DLC_ENTER_BUSY to DLC
                change state to Connect Pending

            In Connect Pending state:
                receive CONTACTED from target DLSw (resulting from his SABME/UA)
                issue a DLC_EXIT_BUSY to DLC
                change state to Connected

    For the case of target station = primary link station:

        At the origin DLSw:

            In Circuit Established state:
                receive a CONTACT from target DLSw
                issue a DLC_CONTACT to DLC (i.e. send SABME)
                change state to Contact Pending
            
            In Contact Pending state:
                receive a DLC_CONTACTED from DLC (i.e. DLC received a UA)
                send a CONTACTED to target DLSw
                change state to Connected

Similar things happen on the target DLSw side.

It therefore appears that the FSM can handle both origin-initiated and
target-initiated contact sequences.  Also, it appears the link station
relationship (primary vs. secondary) has no effect on the DLSw
relationship (origin vs. target).

    origin/target     = f(who caught the Route Discovery)
    primary/secondary = f(who caught the Set Mode)

Obviously for LLC2, Route Discovery = TEST and Set Mode = SABME; but for
SDLC, Route Discovery = n/a and Set Mode = SNRM.  origin/target seems
irrelevant for SDLC-to-SDLC.

Wayne

P.S. I think you meant to say primary/seconday link station instead of 
     primary/secondary LU.  Right?

P.P.S. We have MacDraw-generated DLSw flow diagrams that show this
       very clearly but we haven't had time to convert them to
       email-able (sorry, Mr. Webster) stick man diagrams yet.

---

From: "Bernard Brady" <[email-masked]>
Date: Fri, 16 Jul 93 10:54:54 EDT

Wayne,

 From the RFC under Connect Pending section  4.2.2.3 - If the target
Data Link Switch happens to receive a SABME command from the target
station while in the CIRCUIT_PENDING state (i.e., a DLC_CONTACTED signal
received from the DLC), the reception of the  REACH_ACK message will
cause the Data Link Switch to enter the  CONNECT_PENDING state and to
send a CONTACT message to the other Data Link Switch.  Thus the target
Data Link Switch has assumed the role of the origin Data Link Switch.

         REACH_ACK (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->

          CONTACT (Data Link ID, Origin Cir ID, Target Cir ID)
           ------------------------------------------------->

	CONTACT (Data Link ID, Origin Cir ID, Target Cir ID)
           <-------------------------------------------------

At the origin DLSw: >

After sending a REACH_ACK origin changes state to Circuit Established.

          In Circuit Established state:
		Case:
                        receive a DLC_CONTACTED from DLC
			 (i.e. DLC received  a SABME and sent a UA :-)
			Set status = Connected
 			issue a DLC_ENTER_BUSY to DLC
			send a CONTACT to target DLSw
                	change state to Connect Pending

At the target DLSw: >

After sending a ICANREACH target changes state to Circuit Pending

             In Circuit Pending state:
		Case:
                        receive a DLC_CONTACTED from DLC
			 (i.e. DLC received  a SABME and sent a UA :-)
			Set status = Connected
 			 issue a DLC_ENTER_BUSY to DLC

		Case
		   	receive a REACH_ACK
				if  status = Connected
                      		    send a CONTACT to target DLSw
                		    change state to Connect Pending
				else
				    change state to Circuit Established

Now both sides are in the Connect pending state and the state machine
ignores CONTACT messages in this state.  The question is should a DLSw
in the  Connect Pending state send a CONTACTED response on receiving a
CONTACT.  My take is that it should and it should also wait for the
CONTACTED response.   

The second question is the statement of assuming the generator of a
CONTACT message is the originator.  I agree with your interpretation
that the originator is always the DLS which issued REACH_ACK.

Bernie

>Received: from ibmstandards.cary.ibm.com by BBN.COM id aa09077;
>          15 Jul 93 18:19 EDT
>Received: by ibmstandards.cary.ibm.com (5.61-AIX-1.2/1.0) from [131.108.1.111] with SMTP
>	id AA168431 (for [email-masked], from [email-masked]/[email-masked]); Thu, 15 Jul 93 18:08:58 -0400
>Received: from regal.cisco.com by dirt.cisco.com with SMTP id AA28237
>  (5.67a/IDA-1.5 for [email-masked]); Thu, 15 Jul 1993 15:14:50 -0700
>Message-Id: <[email-masked]>
>To: [email-masked] (Scott Barvick)
>Cc: [email-masked]
>Subject: Re: origin/target notation 
>In-Reply-To: Your message of "Thu, 15 Jul 93 17:35:53 EDT."
>             <[email-masked]> 
>Date: Thu, 15 Jul 93 15:14:49 PDT
>From: [email-masked]
>
>